package com.lanqiao.dao.impl;

import com.lanqiao.dao.ShufflingDao;
import com.lanqiao.entity.Shufflinginfo;
import com.lanqiao.util.ORMUtil;

import java.util.List;

public class ShufflingImpl implements ShufflingDao {
    @Override
    public List<Shufflinginfo> selectshufflingpic() {
        String sql="SELECT * FROM tb_ad";
        List<Shufflinginfo> list=new ORMUtil().selectList(Shufflinginfo.class,sql);

        return list;
    }

    @Override
    public int addshuffling(String  ad_img,int book_id) {
        String sql="INSERT INTO tb_ad(ad_img,book_id) VALUES(?,?)";
        int i = new ORMUtil().executeDML(sql, ad_img, book_id);


        return i;
    }
}
